package core.genetic.crossover;

import core.*;
import core.genetic.*;

public class LearningDelayedCrossover implements Crossover {

	final Crossover noC = new NoCrossover();
	final LearningCrossover learnC;
	final int delay;
	
	public LearningDelayedCrossover(int delay, int learningCasesCount, double learningKoef) {
		this.delay = delay;
		learnC = new LearningCrossover(learningCasesCount, learningKoef);
	}

	@Override
	public Individual crossover(Individual ind1, Individual ind2) {
		if (Mode.mode.currentGeneration > delay) 
			return learnC.crossover(ind1, ind2);
		else return noC.crossover(ind1, ind2);
	}
	
	
	
	
}
